package net.sf.rose.file.excel.poi.model;

import java.util.ArrayList;
import java.util.List;

/**
 * 一个Sheet只允许有一个表格和任意多个无序单元格，且这些单元格必须在表格之上
 * @author fengjian
 * @since 2016/05/08
 */
public class SheetModel {

	/** 表名称 */
	private String name = null;

	/** 散列单元格模型列表 */
	private List<CellModel> cellModels = new ArrayList<>();

	/** 列表单元格所在行 */
	private int listRowNum = 100;

	/** 列表单元格所在起始列 */
	private int listColNum = 100;

	/** 行数据模型列表 */
	private List<CellModel> listCellModels = new ArrayList<>();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

	public List<CellModel> getCellModels() {
		return cellModels;
	}

	public void setCellModels(List<CellModel> cellModels) {
		this.cellModels = cellModels;
	}

	public void addCellModel(CellModel cellModel) {
		this.cellModels.add(cellModel);
	}

	public int getListRowNum() {
		return listRowNum;
	}

	public void setListRowNum(int listRowNum) {
		if (this.listRowNum > listRowNum) {
			this.listRowNum = listRowNum;
		}
	}

	public int getListColNum() {
		return listColNum;
	}

	public void setListColNum(int listColNum) {
		if (this.listColNum > listColNum) {
			this.listColNum = listColNum;
		}
	}

	public List<CellModel> getListCellModels() {
		return listCellModels;
	}

	public void setListCellModels(List<CellModel> listCellModels) {
		this.listCellModels = listCellModels;
	}

	public void addListCellModel(CellModel cellModel) {
		this.listCellModels.add(cellModel);
	}

}
